<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        window.onload = function () {
            var sec = 5;
            var secondEle = document.getElementById("second");
            var timer = setInterval(function () {
                secondEle.innerHTML = sec;
                sec--;
                if(sec==0){
                    clearInterval(timer);
                    location.href="http://www.baidu.com";
                }
            },1000)
        }
    </script>
</head>
<body>
    恭喜你，注册成功，<span style="color:red;" id="second">5</span>秒钟后跳转，如不跳转点击<a href="http://www.baidu.com">这里</a>！
</body>
</html>